package com.syh.jn.scm.domain.upstream.entity.finance;

import com.syh.core.ddd.domain.AbstractSimpleAggregate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 下游应收应付记录
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class UpBusinessAccountRecord extends AbstractSimpleAggregate<Long> {
  /**
   * 原始单据ID
   */
  private Long originalDocumentId;
  /**
   * 原始单据编号
   */
  private String originalDocumentCode;
  /**
   * 原始单据类型: 正的有(1销售单,2采购退货单,3收入单,4付款单),负的有(5采购单,6销售退货单,7费用单,8收款单)
   */
  private Short originalDocumentType;
  /**
   * 收付款金额(负的为-,正的为+)
   */
  private BigDecimal rePayAmount;
  /**
   * 增减应收付金额(负的为-,正的为+)
   */
  private BigDecimal changeAmount;
  /**
   * 汇总余额
   */
  private BigDecimal summaryBalance;
  /**
   * 客户id
   */
  private Long customerId;
  /**
   * 客户类型: 0上游, 1下游, 2物流
   */
  private Short customerType;
  /**
   * 归属端id
   */
  private Long businessEntityId;
}
